package com.tsll.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.tsll.dao.SysOperLogMapper;
import com.tsll.entity.SysOperLog;
import com.tsll.service.SysOperLogService;
import com.tsll.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service

public class SyOperLogServiceImpl implements SysOperLogService {
    @Autowired
    private SysOperLogMapper sysOperLogMapper;
    @Override
    public int insertOperlog(SysOperLog operLog) {
       return sysOperLogMapper.insert(operLog);
    }

    @Override
    public Result findAll(Integer current, Integer pageSize) {
        PageHelper.startPage(current,pageSize);
        List<SysOperLog> sysOperLogs = sysOperLogMapper.selectAll();
        PageInfo<SysOperLog> pageInfo = new PageInfo<>(sysOperLogs);
        return new Result(200, "查询日志", pageInfo);
    }



    }

